package br.com.sgac.remote{
	import br.com.sgac.objetos.Agendamento;
	import br.com.sgac.objetos.Medico;
	
	import mx.rpc.AsyncToken;
	import mx.rpc.Responder;

	public class remoteAgendamento extends Remote{
		public function remoteAgendamento()		{
			getInstance();
		}
		public function inserirAgendamento(result:Function,agendamento:Agendamento,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.inserirAgendamento(agendamento);
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
		public function listarTodosAgendamento(result:Function,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.listarTodosAgendamento();
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
		public function listarAgendamentos(result:Function,medico:Medico,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.listarAgendamentos(medico);
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
		public function listarAgendamentoMedicoData(result:Function,codMedico:String,data2:String,soucer:String):void{
			_remote.source = soucer;
			var async:AsyncToken = _remote.listarAgendamentosDataMedico(codMedico,data2);
			async.addResponder(new Responder(result,defaultFaultHandler));
		}
	}
}